﻿using System;
using System.Collections;

namespace ConsoleApp15
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue queue = new Queue();
            queue.Enqueue("hehe");
            queue.Enqueue("haha");
            queue.Enqueue("xixi");
            Console.WriteLine("kaishi:");

            while(queue.Count !=0)
            {
                Console.WriteLine(queue.Dequeue() + "yikaishi");
            }
            Console.WriteLine("jieshu");

            Queue queue1 = new Queue();
            queue1.Enqueue("aaa");
            queue1.Enqueue("bbb");
            queue1.Enqueue("ccc");
            object[] obj = queue1.ToArray();
            foreach(var v in obj)
            {
                Console.WriteLine(v);
            }

            Queue queue2 = new Queue();
            queue2.Enqueue("aaa");
            queue2.Enqueue("bbb");
            queue2.Enqueue("ccc");
            IEnumerator enumerator = queue2.GetEnumerator();
            while(enumerator.MoveNext())
            {
                Console.WriteLine(enumerator.Current);
            }

        }
    }
}
